package com.zs.toolbox.web2j.system.core.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 用户-第三方登陆信息
 * </p>
 *
 * @author eric.zhang
 * @since 2018-10-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_user_open")
@ApiModel(value="WtUserOpenEntity对象", description="用户-第三方登陆信息")
public class WtUserOpenEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "用户ID")
    @TableField("user_id")
    private Long userId;

    @ApiModelProperty(value = "用户唯一身份ID")
    @TableField("open_id")
    private String openId;

    @ApiModelProperty(value = "用户平台类型")
    @TableField("openType")
    private String openType;

    @TableField("accessToken")
    private String accessToken;

    @ApiModelProperty(value = "token有效期")
    @TableField("expiredTime")
    private Long expiredTime;

    @ApiModelProperty(value = "token有效期")
    @TableField("nickname")
    private String nickname;

    @ApiModelProperty(value = "头像")
    @TableField("headImg")
    private String headImg;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "update_time", update = "now()", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    @ApiModelProperty(value = "国家")
    @TableField("country")
    private String country;

    @ApiModelProperty(value = "省份")
    @TableField("province")
    private String province;

    @ApiModelProperty(value = "性别")
    @TableField("gender")
    private String gender;

    @ApiModelProperty(value = "微信联合ID（微信专用）")
    @TableField("union_id")
    private String unionId;

    @ApiModelProperty(value = "城市")
    @TableField("city")
    private String city;


}
